The present invention generally relates to management instrumentation systems, and more specifically relates to computer systems having instrumented hardware devices.
The Advanced Configuration and Power Interface (xe2x80x9cACPIxe2x80x9d) specification is an open-industry specification, co-developed by Intel, Microsoft, and Toshiba, that defines an interface to a computer system board that enables the operating system to implement operating-system directed power management and system configuration. (The ACPI specification is available at xe2x80x9chttp://www.teleport.com/xcx9cacpi/spec.htmxe2x80x9d, and is incorporated herein by reference.) By following the ACPI specification, manufacturers can build systems consistent with the xe2x80x9cOnNowxe2x80x9d design initiative for instantly available computer systems.
ACPI compliant hardware includes features necessary to support operating system power management, such as hard disk spin-down, video power-down, or modem power-off. The interfaces to those features are described using the Description Tables in the ACPI specification. The features of ACPI hardware are controlled through ACPI Software Language (xe2x80x9cASLxe2x80x9d) control methods compiled and stored in the system Basic Input/Output System (xe2x80x9cBIOSxe2x80x9d) or non volatile Random Access Memory (NVRam). The ASL control methods are typically interpreted and executed by a virtual machine that is embedded in an ACPI driver within the ACPI system. The operating system calls down to the ACPI driver, which accesses the features associated with the ACPI hardware.
Until now, the functionality provided by the ACPI specification has been limited to power management controlled by the operating system. The features made available by ACPI hardware, as well as other features enabled by the ACPI specification, have been accessible only by the operating system because the ACPI driver is a kernel mode driver and, therefore, is not directly accessible by software application programs executing in user mode. As is known in the art, xe2x80x9ckernel modexe2x80x9d refers to processing that occurs at the most privileged and protected level of the operating system. Kernel mode software resides in protected memory at all times and provides basic operating-system services. xe2x80x9cUser modexe2x80x9d refers to processing that occurs at the application layer and which does not have general access to kernel mode drivers.
In the past, a developer of a user mode application that desired access to the information and features made possible by ACPI hardware, needed to create a private kernel mode driver that was able to interface with the kernel mode ACPI driver, and then provide an interface to that private kernel mode driver from the user mode application. Unfortunately, that solution has the disadvantage of requiring all the developers of user mode applications to develop unique kernel mode drivers to essentially provide private access to the ACPI driver. Moreover, if each user mode application has a corresponding kernel mode driver to perform essentially the same task, the computer system suffers the performance burden of having similar code executing in several disparate drivers all loaded in the kernel. Still another disadvantage of existing technologies is that the user mode interface is inconsitent and nonuniform.
Accordingly, a need exists for a mechanism by which the information and features of ACPI compliant hardware can be exposed to user mode applications without the need to develop private kernel mode drivers for each of several user mode applications.
The present invention addresses the above identified needs by providing a mechanism for exposing to user mode applications the features and information enabled by the ACPI specification. The present invention provides a generic mapping driver that executes in kernel mode, and that makes calls to the ACPI driver accessible by user mode applications. The mapping driver may be a part of a management instrumentation system, such as the Windows Management Instrumentation (xe2x80x9cWMIxe2x80x9d) system. WMI is one implementation of the Common Information Model (xe2x80x9cCIMxe2x80x9d) schema for managing systems, networks, applications, databases, and devices. The schema allows the mapping of data from diverse data sources in a common, normalized and logically organized way, and enables correlation and associations between the management data regardless of type, content, or source of origin. The WMI system provides an interface through which instrumented components, such as hardware devices, can provide information and notification to management applications in user mode through a consistent management information store. The WMI system is described in detail is several papers found at xe2x80x9chttp://www.microsoft.com/hwdev/manageability/.xe2x80x9d
Briefly stated, an ACPI mapping driver is provided as a kernel mode component of the management instrumentation system and interfaces with the ACPI driver of the ACPI system. At initialization, the ACPI mapping driver queries the ACPI driver for a list of data block, event, and method globally unique identifiers (xe2x80x9cGUIDsxe2x80x9d) supported by AML code within the ACPI descriptor tables managed by the ACPI driver. The ACPI mapping driver maps those GUIDs to control method IDs, and the GUIDs are then registered with the management instrumentation system.
User mode applications interested in the features of a registered ACPI device may issue to the management instrumentation system queries, sets, or methods to pass data back and forth between the user mode application and the ACPI device. In addition, user mode applications may request to be notified of events issued by particular ACPI devices, such as an indication that the system temperature has exceeded a certain threshold.
To communicate with the ACPI device, the management instrumentation system issues an I/O Request Packet (xe2x80x9cIRPxe2x80x9d) to the ACPI mapping driver. The IRP reflects a particular call from a user mode application in a format consistent with the management instrumentation system. The ACPI mapping driver then translates the IRP to the appropriate ACPI control method call and issues that call to the ACPI driver. The ACPI driver handles the call in the same way that it would handle a call from it""s native ACPI system. For example, if the call from the ACPI mapping driver was a query for information maintained within an ACPI device, the ACPI driver responds by executing AML code within the ACPI driver that retrieves the desired information from the associated ACPI device. The ACPI driver then returns the data to the ACPI mapping driver, which, in turn, returns the data to the requesting user mode application.
In this manner, user mode applications may gain access to the features enabled through the ACPI system. One benefit of the present invention is that management applications may now access ACPI information at the hardware level through a common information model, which obviates the need for developers to create private interfaces to kernel mode drivers to access that information. Moreover, a personal computer manufacturer wishing to differentiate their hardware need only write some ACPI ASL code and a CIM compliant managed object text file describing the data returned by the ASL method. The pc manufacturer need not write any device drivers. For example, a laptop vendor providing a shock sensor that counts how many times the laptop has been dropped on the floor. The data from the ASL method is available to all applications that implement and understand the Common Information Model (CIM) schema.